package base.model;

import java.time.LocalDateTime;

/**
 * 订单模型
 *
 * @author Kcjuly
 * @date 2024-04-25
 * <p>
 * 属性：订单编号、订单时间、客户名称、商品编号、商品名称、单价、数量, 合计价格
 * 字段： orderId、orderTime、clientName、goodsId、goodsName、price、quantity
 */

public abstract class OrdersBaseModel {
    protected String orderId;
    protected LocalDateTime orderTime;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public LocalDateTime getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(LocalDateTime orderTime) {
        this.orderTime = orderTime;
    }

    //todo 重写实现计算总价方法
    public abstract double getTotalPrice();

    /* 示例
    public abstract double getTotalPrice() {
        //自动计算订单价格
        //return price * quantity;
    }
    */

    //todo 其余属性字段，需要继承完善
}
